The technology described herein relates to graphics processing systems and in particular to methods of and apparatus for taking account of the effect of light shafts when rendering images for display.
When rendering images, such as output frames, for display in graphics processing systems, it is often desirable to be able to take account of the effect of light shafts in the scene being rendered. Light shafts can occur, for example, when light passes through a light-scattering medium. Various rendering techniques have been developed to try to do this.
One such technique involves placing a geometric object that represents the light shaft in the scene. The object is rendered as a transparent object and blended with the rest of the scene to give the appearance of a light shaft. However, this technique does not always give realistic results, for example when the viewpoint (camera) position for the scene is close to or inside of the light shaft. In addition, the light shaft can appear to have “hard” edges. Furthermore, the geometric object must be reconstructed whenever the light position changes.
Other techniques for taking into account the effects of light shafts make use of so-called “shadow maps” or light-space sampling planes. Generally in these techniques, one or more textures that are indicative of the light shaft(s) as seen from the viewpoint (camera) position for the scene are derived (e.g. in one or more first rendering passes), and then used when rendering the output frame to modify the scene so that the light shaft(s) are displayed.
While the use of these techniques can be effective for allowing the effect of light shafts to be taken account of in a realistic manner when rendering images, the need to first prepare, and then store and use, one or more textures in these arrangements means that they can become very expensive (e.g. in terms of memory and bandwidth resources), particularly if there are plural light sources that need to be considered. It can also be necessary to regenerate the texture(s) whenever the light or viewpoint (camera) position changes (which can happen each frame). These techniques can also suffer from pixel instabilities/flickering, e.g. when the viewpoint (camera) position moves.
The Applicants believe therefore that there remains scope for improved techniques for rendering light shafts in graphics processing systems.
Like reference numerals are used for like components where appropriate in the drawings.